package com.xg.sys.vo;

import com.xg.sys.entity.SysDictionary;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * @author tzt
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@ApiModel(value="SelectVO对象", description="select下拉组件实体")
public class SelectVO {
    @ApiModelProperty(value = "下拉编码")
    private Object code;

    @ApiModelProperty(value = "下拉名称")
    private String name;

    public static SelectVO fill(SysDictionary sysDictionary) {
        return new SelectVO().setCode(sysDictionary.getDataCode()).setName(sysDictionary.getDataName());
    }
}
